package cn.lzy.demo;

import cn.lzy.demo.entity.User;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description 传统方式：AnnotationConfigApplicationContext（Java配置）、ClassPathXmlApplicationContext（Xml配置）
 * @Author lzy
 * @Date 2024/3/8 11:57
 * @Version
 **/
public class GeneralDemo {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");
        User user = ctx.getBean("user", User.class);
        System.out.println(user);
    }
}
